<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<br />
<table class="surveystableborder" cellspacing="0" cellpadding="0" border="0" width="100%">
<thead>
	<tr>
		<th colspan=<?php echo $this->escape($this->graphwidth); ?> class="sectiontableheader">
			<?php echo $this->escape($this->lists['part_title']); ?>
			<input type="hidden" name="startId" value="<?php echo $this->startId;?>" />
			<input type="hidden" name="endId" value="<?php echo $this->endId;?>" />
		</th>
	</tr>
</thead>
<tbody>
<?php $index = 1; ?>
<?php foreach($this->votes as $vote) : ?>
	<tr class="sectiontableentry2">
		<td colspan=<?php echo $this->escape($this->graphwidth); ?>>
			<?php echo $index++ ?>、<?php echo $vote->text; ?>
			<input type="hidden" name="hd_vote<?php echo $vote->id; ?>" value="<?php echo $vote->type; ?>" />
			<input type="hidden" name="hd_value<?php echo $vote->id; ?>" value="" />
		</td>
	</tr>
	<tr class="sectiontableentry1">
	  <?php if ($vote->type == 'radio' || $vote->type == 'radio_other') {?>
		  <?php foreach((array)$vote->option as $options) : ?>
			<td width="<?php echo 100/(int)($this->escape($this->graphwidth)); ?>%">
				<input type="radio" name="option<?php echo $vote->id; ?>" id="vote<?php echo $vote->id; ?>id<?php echo $options->id; ?>" value="<?php echo $options->val; ?>" />
				<label for="vote<?php echo $vote->id; ?>id<?php echo $options->id; ?>"><?php echo $options->text; ?></label>
			</td>
		  <?php endforeach; ?>
		  <?php if ($vote->type == 'radio_other') {?>
			<td width="<?php echo 100/(int)($this->escape($this->graphwidth)); ?>%">
				<input type="radio" name="option<?php echo $vote->id; ?>" id="vote<?php echo $vote->id; ?>id0"/>
				<label for="vote<?php echo $vote->id; ?>id0">其他</label>
				<input type="text" name="option<?php echo $vote->id; ?>_other" onfocus="RadioOther('vote<?php echo $vote->id; ?>id0');" size="6" maxlength="50">
			</td>
		  <?php } ?>
	  <?php } else if ($vote->type == 'text'){ ?>
		  <td colspan=<?php echo $this->escape($this->graphwidth); ?>>
		  	<input type="text" name="text_option<?php echo $vote->id; ?>_name" id="text_option<?php echo $vote->id; ?>" size="80" maxlength="400" value="" />
		  </td>
	  <?php } ?>
	</tr>
	<tr><td colspan=<?php echo $this->escape($this->graphwidth); ?>>&nbsp</td></tr>
<?php endforeach; ?>
</tbody>
	<tr>
		<td colspan=<?php echo $this->escape($this->graphwidth); ?>>
			<div align="center">
				<button class="button validate" type="submit">  下一页   </button>
			</div>
		</td>
	</tr>
</table>

	<input type="hidden" name="task" value="vote" />
	<input type="hidden" name="id" value="<?php echo $this->survey_id;?>" />
	<input type="hidden" name="part" value="<?php echo ($this->part_id + 1);?>" />
	<input type="hidden" name="voteid" value="<?php echo $this->voteid;?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
<br />
